/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package data;
import java.sql.Connection;
import java.sql.ResultSet;
//import java.sql.SQLException;
import java.sql.Statement;
import java.util.*;

/**
 *
 * @author NS
 */
public class List_TmpTablespace {
    private Connection conn;
    public List_TmpTablespace(Connection conn){
        this.conn = conn;
    }
    public ArrayList<String> tbspaceList(){
        Statement select;
        ArrayList<String> lst = new ArrayList<String>();
        try{
            select = conn.createStatement();
            ResultSet rs = select.executeQuery("SELECT TABLESPACE_NAME FROM USER_TABLESPACES");
            while(rs.next()){
                lst.add(rs.getString(1));
            }
        }catch(Exception e){
            System.out.println(e);
            return null;
        }
        return lst;
    }
}
